package com.hdaccp.foodsales.service.impl;

import com.hdaccp.foodsales.dao.GroupsDao;
import com.hdaccp.foodsales.entity.Groups;
import com.hdaccp.foodsales.service.GroupsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GroupsServiceImpl implements GroupsService {
    @Autowired
    private GroupsDao GroupsDao ;
    @Override
    public List<Groups> findAll(String name, int limit, int offset) {
        return GroupsDao.query(name,limit,offset);
    }

    @Override
    public long findCount(String name) {
        return GroupsDao.getTotalCount(name);
    }
}
